﻿#ifndef COMMANDS_H
#define COMMANDS_H

#include <QUndoCommand>
#include "graphicsitem.h"
#include "graphicsscene.h"

class Commands : public QUndoCommand
{
public:
    Commands(GraphicsItem::EGraphicsType addType, QGraphicsScene *graphicsScene, QUndoCommand *parent=0);
    ~Commands();

    void undo();
    void redo();

private:
    QString createCommandString(GraphicsItem *item, const QPointF &point);

private:
    GraphicsItem *m_pGraphicsItem;
    QGraphicsScene *m_GraphicsScene;
    QPointF initialPosition;
};

#endif
